Goal¶Agenda¶# Age Distribution
fig = px.histogram(df_customer.age, x="age", title='Age Distribution', nbins=16)
fig.show()
# Gender Distribution
fig = px.histogram(df_customer.gender, x="gender", title='Gender Distribution', width = 600)
fig.show()
# Number of children
fig = px.histogram(df_customer.nbr_children, x="nbr_children", title='Number of Children per Customer', width = 600)
fig.show()
# Income disparity by Gender
fig.show()


Group 3 (turquoise): Premium Cashback and Rewards Card with first-year fee rebate
# Multi-dimensional Analysis
df_segmentation
| gender | income | credit_interests | total_trans | net_worth | |
|---|---|---|---|---|---|
| 0 | 1 | 50890 | 361.26 | 84 | 1254.83 |
| 1 | 0 | 10053 | 14.81 | 54 | 1847.77 |
| 2 | 0 | 22690 | 56.93 | 94 | -1054.51 |
| 3 | 1 | 6605 | 13.63 | 15 | -134.13 |
| 4 | 0 | 55888 | 248.77 | 124 | 479.08 |
| ... | ... | ... | ... | ... | ... |
| 452 | 1 | 9271 | 79.61 | 62 | -596.25 |
| 453 | 0 | 10244 | 12.21 | 130 | -175.02 |
| 454 | 0 | 19863 | 41.27 | 18 | -842.24 |
| 455 | 0 | 39942 | 0.00 | 17 | 0.00 |
| 456 | 1 | 142274 | 963.28 | 135 | -5646.76 |
457 rows × 5 columns

pd.DataFrame(pca.explained_variance_ratio_).plot.bar()
plt.legend('')
plt.xlabel('Principal Components')
plt.ylabel('Explained Varience');

